
<div class='fui-page fui-page-current'>
    <div class="fui-header">
		<div class="fui-header-left">
			<a class="back" ng-click="goback()"></a>
		</div>
		<div class="title">月结费用</div> 
		<div class="fui-header-right">&nbsp;</div>
    </div>
    <div class="fui-content">
		<div class='fui-cell-group'>
			<div class='fui-according'>
				<div class='fui-according-header' style="color: #666;line-height:1.2rem;padding-left:0.6rem">
					月结账单
					<div class="text" style="font-size:0.65rem;color:#666;line-height:1.2rem;padding-left:1rem">
						上月({{pagedata.jielog.month}}月)账单 <span class='text-danger'>{{pagedata.jielog.orderprice || '0.00'}}</span> 元！</span>
					</div>
				</div>
			</div>
		</div>
		<div class='fui-cell-group'>
			<div class='fui-cell'>
				<div class='fui-cell-label'>支付金额</div>
				<div class='fui-cell-info c000'>￥{{pagedata.jielog.orderprice}}</div>
			</div>
		</div>
		<a ng-if="!pagedata.order_id" href="javascript:;" class='btn btn-success block' ng-click="pagedata.pay_submit(pagedata.jielog,'jy_yuejie/payjie/post/','jy_yuejie/jie_log/')">确认缴纳</a>
		<a ng-if="pagedata.order_id" href="javascript:;" class='btn btn-success block' ng-click="access_json('jy_yuejie/jie_log/')">查看订单</a>
</div>
<script>
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			},'','',complete_url,complete_url);
		}
	});
}
</script>